import { Component, OnInit } from '@angular/core';
import { Location as Location1 } from '@angular/common';

@Component({
  selector: 'app-go-big-screen',
  templateUrl: './go-big-screen.component.html',
  styleUrls: ['./go-big-screen.component.scss']
})
export class GoBigScreenComponent implements OnInit {
  goBigScreen = () => {
    let url = location.host
    // const i = location.host.lastIndexOf(':')
    // if (i >= 0) {
    //   url = location.host.slice(0, i) + ':8000'
    // }
    // console.log(url)
    globalThis.open(`${location.protocol}//${url}/public`)
  }
  constructor(private location1: Location1,) {}

  ngOnInit(): void {
    //router.back()
    this.location1.back()
    this.goBigScreen()
  }

}
